import request from '@/utils/request'

// 采购记录列表
export function queryPurchaseList(params) {
  return request({
    url: '/admin/purchase/getPurchaseRecordList',
    method: 'post',
    data: params
  })
}

// 获取物资列表
export function queryMaterialList(params) {
  return request({
    url: '/admin/purchase/getMaterialListByName',
    method: 'get',
    params
  })
}

// 创建采购记录
export function createPurchase(params) {
  return request({
    url: '/admin/purchase/createPurchaseRecord',
    method: 'post',
    data: params
  })
}

// 库存列表
export function queryStockList(params) {
  return request({
    url: '/admin/purchase/getConsumptionRecordList',
    method: 'post',
    data: {
      ...params
    }
  })
}
